<ion-view title="消息中心">

	<ion-content delegate-handle="changScroll" style="background-color:#f5f5f5;padding-top:10px;">
		
		<div style="width: 100%;height: 40px;font-size:16px;background-color: white;">
			<div class="button-bar" style="margin: 0 auto;" ng-if="msgStatus==1">
			  <a style="text-align: center;width: 50%;color: #42bd55;border-bottom: 2px solid #42bd55;height: 40px;line-height: 40px;" ng-click="changeSel(1)">公告</a>
			  <a style="text-align: center;width: 50%;color: #888888;height: 40px;line-height: 40px;" ng-click="changeSel(2)">我的消息</a>
			</div>
			<div class="button-bar" style="margin: 0 auto;" ng-if="msgStatus==2">
			  <a style="text-align: center;width: 50%;color: #888888;height: 40px;line-height: 40px;" ng-click="changeSel(1)">公告</a>
			  <a style="text-align: center;width: 50%;color: #42bd55;border-bottom: 2px solid #42bd55;height: 40px;line-height: 40px;" ng-click="changeSel(2)">我的消息</a>
			</div>
		</div>

		<ion-list ng-if="msgStatus==1">
		  	<ion-item ng-repeat="msg in ggList" ng-click="msgDetail(msg)" style="font-size:13px;padding-left: 10px;padding-right: 10px;">
				<div>
					<div>{{msg.title}}</div>
					<div>{{msg.content}}</div>
				</div>
			</ion-item>
	      <ion-infinite-scroll ng-if="gNoMore" on-infinite="loadGMsgList()" distance="20%"></ion-infinite-scroll>
	    </ion-list>
	    
	    <ion-list ng-if="msgStatus==2">
	      	<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="msg in myMsgList" ng-click="msgDetail(msg)" type="item-text-wrap" style="font-size:13px;padding-left: 10px;padding-right: 10px;">
				<div>
					<div style="font-size:18px;">{{msg.title}}</div>
					<div style="padding:10px;"><p style="white-space:normal">{{msg.pushMsg}}</p></div>
					<div style="text-align: right;">{{msg.insertTime | date:'yyyy-MM-dd HH:mm:ss'}}</div>
				</div>
			</ion-item>
	      <ion-infinite-scroll ng-if="mNoMore" on-infinite="loadMyMsgList()" distance="20%"></ion-infinite-scroll>
	    </ion-list>
		
	</ion-content>
</ion-view>